package com.glory.dgcpcpda.adapter;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.dgcpcpda.R;
import com.glory.dgcpcpda.entity.AlarmInfo;
import com.glory.dgcpcpda.entity.TeBindEqpEntity;
import com.pda.platform.ui.ui_pdaplatform.callback.FreeUI_CommonCallback;
import com.pda.platform.ui.ui_pdaplatform.utils_public.FreeApi_DialogUtils;

import java.util.List;

public class CpcTeBindEqpInfoAdapter extends BaseQuickAdapter<TeBindEqpEntity, BaseViewHolder> {

    public CpcTeBindEqpInfoAdapter(@Nullable List<TeBindEqpEntity> data) {
        super(R.layout.tebindeqp_info_list, data);

    }

    @Override
    protected void convert(BaseViewHolder helper, TeBindEqpEntity item) {
        helper.setText(R.id.tvusername,item.getUSERNAME());//工号
        helper.setText(R.id.tveqpId,item.getEQPID());//设备
        helper.setText(R.id.tvteamWork,item.getWORKTEAM());//班别
        helper.setText(R.id.tvbinddate,item.getBINDATE());//日期
        helper.getView(R.id.ivDelete).setOnClickListener(view -> {
            remove(helper.getAdapterPosition());
            notifyDataSetChanged();
        });

    }


}
